import { request } from '@ruifox-cms/utils'

// 获取权限组列表
export function getAuthorityGroupList(params) {
    return request({
        url: '/auth/authorityGroup/selectList',
        method: 'get',
        params
    })
}

// 添加权限组
export function insertAuthorityGroup(data) {
    return request({
        url: '/auth/authorityGroup/insert',
        method: 'post',
        data
    })
}

// 删除权限组
export function deleteAuthorityGroup(data) {
    return request({
        url: '/auth/authorityGroup/delete',
        method: 'post',
        data
    })
}

// 修改权限组
export function updateAuthorityGroup(data) {
    return request({
        url: '/auth/authorityGroup/update',
        method: 'post',
        data
    })
}

// 获取权限接口列表
export function getAuthorityList(params) {
    return request({
        url: '/auth/authority/selectList',
        method: 'get',
        params
    })
}

// 添加权限接口
export function insertAuthority(data) {
    return request({
        url: '/auth/authority/insert',
        method: 'post',
        data
    })
}

// 批量删除权限接口
export function deleteAuthorityList(data) {
    return request({
        url: '/auth/authority/deleteList',
        method: 'post',
        data
    })
}

// 删除权限接口
export function deleteAuthority(data) {
    return request({
        url: '/auth/authority/delete',
        method: 'post',
        data
    })
}

// 修改权限接口
export function updateAuthority(data) {
    return request({
        url: '/auth/authority/update',
        method: 'post',
        data
    })
}

// 树状查询接口
export function getAuthorityTree(params) {
    return request({
        url: '/auth/authority/selectTree',
        method: 'get',
        params
    })
}

// 根据角色id查询接口
export function getAuthorityByRoleId(params) {
    return request({
        url: '/auth/authority/selectByRoleId',
        method: 'get',
        params
    })
}